package cn.itlaobing.scope;

import org.springframework.context.support.AbstractApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
	public static void main(String[] args) {
		String containter="classpath:cn/**/scope/car.xml";
		AbstractApplicationContext context=new ClassPathXmlApplicationContext(containter);
		Car c1=context.getBean("car", Car.class);
		System.out.println(c1.toString());
		Car c2=context.getBean("car", Car.class);
		System.out.println(c2.toString());
		Car c3=context.getBean("car1", Car.class);
		System.out.println(c3.toString());
		Car c4=context.getBean("car1", Car.class);
		System.out.println(c4.toString());
		context.close();
	}
}
